package com.byit.service.impl;

import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.byit.domain.SysUserRole;
import com.byit.mapper.SysUserRoleMapper;
import com.byit.service.ISysUserRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 后台用户表 服务实现类
 * </p>
 *
 * @author wangx
 * @since 2018-12-11
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements ISysUserRoleService {

    @Autowired
    private SysUserRoleMapper sysUserRoleMapper;

    @Override
    public void deleteByUserIds(List<Long> userIds) {
        sysUserRoleMapper.deleteByUserIds(userIds);
    }

    @Override
    public void deleteByRoleIds(List<Long> roleIds) {
        sysUserRoleMapper.deleteByRoleIds(roleIds);
    }

    @Override
    public Integer selectByRoleIds(List<Long> roleIds) {
        return sysUserRoleMapper.selectByRoleIds(roleIds);
    }
}
